package com.vincent.template.repository;

import com.vincent.template.commons.base.BaseJpaRepository;
import com.vincent.template.domain.SysBindUserRolePo;

import java.util.Collection;
import java.util.List;

/**
 * @author Vincent Wang
 * @date 2020/12/30 11:24
 */
public interface SysBindUserRoleRepository extends BaseJpaRepository<SysBindUserRolePo, Long> {
    List<SysBindUserRolePo> findByUserId(String userId);
    List<SysBindUserRolePo> findByRoleId(Long roleId);
    int deleteByUserId(String userId);
    List<SysBindUserRolePo> findByUserIdAndRoleIdIn(String userId, Collection<Long> roleIds);
}
